package client.global.commlib.widget

import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.FrameLayout
import androidx.databinding.DataBindingUtil
import client.global.commlib.R
import client.global.commlib.databinding.ViewLoadingMgLayoutBinding

class LoadingMsgLayout @JvmOverloads constructor(
    context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : FrameLayout(context, attrs, defStyleAttr) {
    val binding: ViewLoadingMgLayoutBinding

    init {
        binding = DataBindingUtil.inflate(
            LayoutInflater.from(context),
            R.layout.view_loading_mg_layout,
            this,
            true
        )
        isClickable = true
        binding?.loading?.show()
    }


    var msg: String = ""
        set(value) {
            msg = value
            binding.tvMsg.text = msg
        }
}